Common contiguous memory region optimized virtual machine migration within a workgroup

ABSTRACT

Embodiments of the invention relate to scanning, by a first processor in a work group, a memory associated with the first processor for data. The first processor updates a first data structure to include at least a portion of the data based on the scanning. The first processor transmits a representation of the first data structure to one or more peer processors of the first processor included in the work group using a dedicated link. The first processor receives a representation of a second data structure associated with at least one of the one or more peer processors of the first processor. The first processor updates the first data structure based on the received representation of the second data structure.

BACKGROUND

The present invention relates to management of virtual machines (VMs),and more specifically, to a common contiguous memory region optimized VMmigration within a work group.

Providers of cloud computing have the competing tasks of providingdesired performance for consumers or end users while also efficientlyallocating the resources used to provide services to consumers. Theresources may be dynamically allocated by the provider to help achievethese goals. Accordingly, a hardware platform may host a plurality ofvirtual machines, wherein each virtual machine corresponds to aconsumer. Efficient use of the hardware platform resources dictates thatthe provider place as many virtual machines on the platform as possiblewithout compromising the consumer's use of the virtual machine andexperience. It may be desirable to move or migrate a virtual machinefrom one hardware platform to another to ensure that the customer is notadversely affected by changes in resources for the virtual machines.

SUMMARY

An embodiment is directed to a method for migrating a virtual machinefrom a first processor to a second processor in a work group. The methodcomprises determining a minimum hardware configuration to support thevirtual machine. The method comprises constructing a list of one or morecandidate processors in the work group to migrate the virtual machineto, wherein each of the one more candidate processors supports theminimum hardware configuration, and wherein the list of one or morecandidate processors comprises the second processor. The methodcomprises determining for each of the one or more candidate processorsinformation about shared contiguous memory regions accessible to thecandidate processor that is in common to contiguous memory regionsaccessed by the virtual machine. The method comprises migrating thevirtual machine from the first processor to the second processor basedon the determination of the information about shared contiguous memoryregions accessible to each of the one or more candidate processors thatare in common to contiguous memory regions accessed by the virtualmachine, wherein the migrating comprises moving contiguous memoryregions that are not in common between the first processor and thesecond processor. An embodiment is directed to a method comprisingscanning, by a first processor in a work group, a memory associated withthe first processor for data. The method comprises updating, by thefirst processor, a first data structure to include at least a portion ofthe data based on the scanning. The method comprises transmitting, bythe first processor, a representation of the first data structure to oneor more peer processors of the first processor included in the workgroup using a dedicated link. The method comprises receiving, by thefirst processor, a representation of a second data structure associatedwith at least one of the one or more peer processors of the firstprocessor. The method comprises updating, by the first processor, thefirst data structure based on the received representation of the seconddata structure.

An embodiment is directed to an apparatus comprising at least oneprocessing device, and a storage device. The storage devices hasinstructions stored thereon that, when executed by the at least oneprocessing device, cause the apparatus to scan a memory associated withthe apparatus for strings of data. The instructions, when executed,cause the apparatus to update a first data structure based on the scan.The instructions, when executed, cause the apparatus to transmit arepresentation of the first data structure to one or more peerprocessors of the apparatus included in a work group. The instructions,when executed, cause the apparatus to receive a representation of asecond data structure associated with at least one of the one or morepeer processors of the apparatus. The instructions, when executed, causethe apparatus to update the first data structure based on the receivedrepresentation of the second data structure.

An embodiment is directed to a computer program product comprising acomputer readable storage medium having computer readable program codeembodied therewith. The computer readable program code comprisescomputer readable program code configured for receiving a request from avirtual machine to migrate the virtual machine from a first processor.The computer readable program code is configured for determining aminimum hardware configuration to support the virtual machine responsiveto the request. The computer readable program code is configured forconstructing a list of one or more candidate processors in a work groupto migrate the virtual machine to, wherein each of the one morecandidate processors supports the minimum hardware configuration. Thecomputer readable program code is configured for determining for each ofthe one or more candidate processors information about shared contiguousmemory regions accessible to the candidate processor that is in commonto contiguous memory regions accessed by the virtual machine. Thecomputer readable program code is configured for migrating the virtualmachine from the first processor to a second processor included in thelist of one or more candidate processors based on the determination ofthe information about shared contiguous memory regions accessible toeach of the one or more candidate processors that are in common tocontiguous memory regions accessed by the virtual machine.

Additional features and advantages are realized through the techniquesof the present invention. Other embodiments and aspects of the inventionare described in detail herein and are considered a part of the claimedinvention. For a better understanding of the invention with theadvantages and the features, refer to the description and to thedrawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter which is regarded as the invention is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The foregoing and other features, and advantages ofthe invention are apparent from the following detailed description takenin conjunction with the accompanying drawings in which:

FIG. 1 depicts a cloud computing node according to an embodiment of thepresent invention;

FIG. 2 depicts a cloud computing environment according to an embodimentof the present invention;

FIG. 3 depicts abstraction model layers according to an embodiment ofthe present invention;

FIG. 4 illustrates an exemplary computing system of a work group inaccordance with an embodiment;

FIG. 5 illustrates a process flow for characterizing a memoryenvironment in accordance with an embodiment;

FIG. 6 illustrates a process flow for migration a virtual machine inaccordance with an embodiment; and

FIG. 7 illustrates a process flow for migrating a virtual machine basedon one or more scores in accordance with an embodiment.

DETAILED DESCRIPTION

Embodiments described herein are directed to common contiguous memoryregion optimized virtual machine (VM) migration within a workgroup,where commonality of contiguous memory regions between a processorcurrently executing a VM and candidate target processors for executingthe VM is taken into account when determining a target processor for theVM. In some embodiments, only those contiguous memory regions that arenot already replicated on the target processor are transferred as partof the VM migration. In embodiments, a dedicated link is used to sharethe information relating to duplicate contiguous memory region contentand/or for migrating the memory contents of the VM to the targetprocessor. As used herein, the term “workgroup” refers to a cluster ofprocessors or machines. As used herein the term “dedicated link” refersto a link or communication channel for transferring memory contiguousmemory regions, or data or metadata associated therewith, between two ormore machines or processors.

Embodiments described herein include a bus designed to share informationor data in an arrangement. In some embodiments, the arrangement takesthe form of a hypervisor common contiguous memory region message busconfigured to share the information as part of a cluster or work group.In some embodiments, the bus is implemented over a transport (e.g., aTransmission Control Protocol/Internet Protocol (TCP/IP) transport) orsome other hardware mechanism. In some embodiments, a dedicated link(e.g., fiber cable) is used to enable a quick, secure transfer betweentwo trusted or physically close machines, such as two peer machines. Thelink may be used to share information or data about common contiguousmemory region replication, which may include metadata about a givencontiguous memory region and how many times it is replicated on a givenmachine, with other machines in a work group or cluster.

It is understood in advance that although this disclosure includes adetailed description on cloud computing, implementation of the teachingsrecited herein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed (e.g., any client-server model).

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 1, a schematic of an example of a cloud computingnode is shown. Cloud computing node 10 is only one example of a suitablecloud computing node and is not intended to suggest any limitation as tothe scope of use or functionality of embodiments of the inventiondescribed herein. Regardless, cloud computing node 10 is capable ofbeing implemented and/or performing any of the functionality set forthhereinabove.

In cloud computing node 10 there is a computer system/server 12, whichis operational with numerous other general purpose or special purposecomputing system environments or configurations. Examples of well-knowncomputing systems, environments, and/or configurations that may besuitable for use with computer system/server 12 include, but are notlimited to, personal computer systems, server computer systems, thinclients, thick clients, hand-held or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 12 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 12 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 1, computer system/server 12 in cloud computing node 10is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 12 may include, but are not limitedto, one or more processors or processing units 16, a system memory 28,and a bus 18 that couples various system components including systemmemory 28 to processor 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnects (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 28 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further depicted and described below,memory 28 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 42 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 12 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing device, a display 24, etc.;one or more devices that enable a user to interact with computersystem/server 12; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 12 to communicate with one or moreother computing devices. Such communication can occur via I/O interfaces22. Still yet, computer system/server 12 can communicate with one ormore networks such as a local area network (LAN), a general wide areanetwork (WAN), and/or a public network (e.g., the Internet) via networkadapter 20. As depicted, network adapter 20 communicates with the othercomponents of computer system/server 12 via bus 18. It should beunderstood that although not shown, other hardware and/or softwarecomponents could be used in conjunction with computer system/server 12.Examples, include, but are not limited to: microcode, device drivers,redundant processing units, external disk drive arrays, RAID systems,tape drives, and data archival storage systems, etc.

Referring now to FIG. 2, illustrative cloud computing environment 50 isdepicted. As shown, cloud computing environment 50 comprises one or morecloud computing nodes 10 with which local computing devices used bycloud consumers, such as, for example, personal digital assistant (PDA)or cellular telephone 54A, desktop computer 54B, laptop computer 54C,and/or automobile computer system 54N may communicate. Nodes 10 maycommunicate with one another. They may be grouped (not shown) physicallyor virtually, in one or more networks, such as Private, Community,Public, or Hybrid clouds as described hereinabove, or a combinationthereof. This allows cloud computing environment 50 to offerinfrastructure, platforms and/or software as services for which a cloudconsumer does not need to maintain resources on a local computingdevice. It is understood that the types of computing devices 54A-N shownin FIG. 2 are intended to be illustrative only and that computing nodes10 and cloud computing environment 50 can communicate with any type ofcomputerized device over any type of network and/or network addressableconnection (e.g., using a web browser).

Referring now to FIG. 3, a set of functional abstraction layers providedby cloud computing environment 50 (FIG. 2) is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 3 are intended to be illustrative only and embodiments of theinvention are not limited thereto. As depicted, the following layers andcorresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include mainframes, in oneexample IBM® zSeries® systems; RISC (Reduced Instruction Set Computer)architecture based servers, in one example IBM pSeries® systems; IBMxSeries® systems; IBM BladeCenter® systems; storage devices; networksand networking components. Examples of software components includenetwork application server software, in one example IBM WebSphere®application server software; and database software, in one example IBMDB2® database software. (IBM, zSeries, pSeries, xSeries, BladeCenter,WebSphere, and DB2 are trademarks of International Business MachinesCorporation registered in many jurisdictions worldwide)

Virtualization layer 62 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers;virtual storage; virtual networks, including virtual private networks;virtual applications and operating systems; and virtual clients.

In one example, management layer 64 may provide the functions describedbelow. Resource provisioning provides dynamic procurement of computingresources and other resources that are utilized to perform tasks withinthe cloud computing environment. Metering and Pricing provide costtracking as resources are utilized within the cloud computingenvironment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security (not shown) provides identity verificationfor cloud consumers and tasks, as well as protection for data and otherresources. User portal provides access to the cloud computingenvironment for consumers and system administrators. Service levelmanagement provides cloud computing resource allocation and managementsuch that required service levels are met. Service Level Agreement (SLA)planning and fulfillment provides pre-arrangement for, and procurementof, cloud computing resources for which a future requirement isanticipated in accordance with an SLA.

Workloads layer 66 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation; software development and lifecycle management; virtualclassroom education delivery; data analytics processing; transactionprocessing; and a mobile desktop for mobile devices (e.g., 54A, 54C, and54N, as well as mobile nodes 10 in cloud computing environment 50)accessing the cloud computing services.

In one embodiment, one or both of the hardware and software layer 60 andthe virtualization layer 62 may include edge components, such as a webserver front end and image cache, as well as an image library store,e.g., in a high-performance RAID storage area network (SAN). In anexemplary embodiment, an application, such as a virtual machinemonitoring application 70 in the virtualization layer 62, may implementa process or method for determining whether to migrate one or morevirtual machines; however, it will be understood that the application 70may be implemented in any layer. In some embodiments, the application 70may select which virtual machine(s) to migrate, and/or one or moredestinations for a migrating virtual machine.

Turning now to FIG. 4, a computing system or environment 400 inaccordance with an embodiment is shown. The system 400 may be indicativeof a cluster or work group.

The system 400 includes three devices, device 1 402, device 2 404, anddevice 3 406. The devices 402, 404, and 406 may be configured tocommunicate with one another. For example, the devices 402, 404, and 406may be configured to communicate with one another over wired or wirelessconnections. While the system 400 is shown as including three devices,in some embodiments more or fewer than three devices may be included. Insome embodiments, one or more of the devices 402, 404, and 406 mayinclude, or be associated with, one or more of the entities describedabove in connection with FIGS. 1-3.

One or more of the devices 402, 404, and 406 may include one or morecomponents. For example, the device 402 is shown in FIG. 4 as includinga processor 408 and memory 410. In some embodiments, the processor 408may correspond to the processing unit 16 of FIG. 1. In some embodiments,the memory 410 may correspond to the memory 28 of FIG. 1. The memory 410may be configured to store data or information. The memory 410 may haveinstructions stored thereon that, when executed by the processor 408,cause the device 402 to perform one or more methodological acts, such asthose described herein. In some embodiments, the device 402 may includemore than one processor 408. The device 402 may include additionalcomponents not shown in FIG. 4. For example, the device 402 may includea transceiver to facilitate communications with the devices 404 and 406.

The device 402 is shown in FIG. 4 as being coupled to the device 404 viaa link 412. The device 404 is shown in FIG. 4 as being coupled to thedevice 406 via a link 414. The device 406 is shown as being coupled tothe device 402 via a link 416. In some embodiments, one or more of thelinks may be optional. For example, if link 416 is omitted, then thedevice 402 and the device 406 might not communicate with one another, ormay communicate with one another via the device 404 serving as anintermediary or router between the devices 402 and 406.

One or more of the links 412, 414, and 416 may correspond to a TCP/IPconnection or a dedicated hardware link. The links 412, 414, and 416 maybe used to share information about, e.g., replicated contiguous memoryregions stored on the machines/devices 402, 404, and 406. The sharing ofreplicated contiguous memory region information may take placeseparately from “normal” network traffic. For example, the sharing ofreplicated contiguous memory region information may occur usingout-of-band communications. Alternatively, in-band communications may beused to communicate, e.g., replicated contiguous memory regioninformation. The replicated contiguous memory region information may beupdated at predetermined intervals (e.g., periodically) to ensure thatthe information is fresh or up-to-date.

One or more of the devices 402, 404, and 406 may track a number ofchunks of memory (e.g., memory 410) that are replicated in the memory inan amount greater than a threshold. As used herein, the term “chunks ofmemory” refers to one or more regions of memory. A chunk of memory maybe contiguous or non-contiguous. The chunks of memory may be stored aspart of, or in connection with, a data structure (e.g., a chained hashtable or map). The contents of the memory may serve as a key and thesize of a chunk of memory, potentially in relation to a unique pagenumber, and offset, and the number of occurrences may be stored as avalue.

When storing the data in the data structure, a check may be performed toensure that there are no collisions in the data structure. In someembodiments, an entry in the data structure takes the form:A-B-C-D-E,

where A serves as a status bit that represents whether a nominal sizepage or not is being referenced, B serves as an indication as to thesize of the chunk of memory, C represents the data content or payload ofthe chunk of memory, D represents an identifier of a device or machinein question, and E represents the number of times the data content orpayload is replicated on the machine in question. Thus, in someembodiments the value:0-2-0x0010-A1-50,

signifies that: a fraction of a page is being referenced (A=0), the sizeof the chunk of memory is half a page (B=2, which when taken togetherwith A=0, may represent a “1-over-value” or fraction of the nominalsystem page size), the data payload or memory content is “0x0010”(C=0x0010), that the device in question is identified by identifier A1(D=A1), and that the data payload of “0x0010” is replicated fifty timeson the device A1 (E=50).

Similarly, in some embodiments the value:1-3-0x0400-A2-30,

signifies that: a nominal size page is being referenced (A=1), the sizeof the chunk of memory is three pages (B=3, when taken together withA=1), the data payload or memory content is “0x0400” (C=0x0400), thatthe device in question is identified by identifier A2 (D=A2), and thatthe data payload of “0x0400” is replicated thirty times on the device A2(E=30).

To communicate the ‘A-B-C-D-E’ indicators from a first machine to asecond machine in a cluster or work group, the page size of the firstand second machines, and a minimum length of memory to be considered mayneed to be established. The page size of each of the machines may betransmitted over a channel or link (e.g., links 412, 414, or 416 of FIG.4).

The system 400 described above may be used to perform a machinemigration (e.g., a VM migration). When a machine (e.g., device 402) isto be migrated, a determination may be made regarding the minimum amountof storage and hardware power (e.g., processing power) the machine needsto work.

If the machine to be migrated (e.g., device 402) finds one or morecandidate machines (e.g., devices 404 and 406) in its work group withthe necessary storage and hardware power, a determination may be maderegarding which of the candidate machines will minimize the amount ofmemory or memory state to be transferred (assuming more than onecandidate machine is identified). Such a determination may be based on aconsultation of a list of, e.g., map, hash tables, where each map, tableis as described above, one such data structure for each machine in thework group or cluster. A migration may then be performed to thecandidate machine that: a) has sufficient hardware power, b) hassufficient storage space available, and c) has the most commonlyreplicated contiguous memory regions as the origin machine (e.g., device402).

Turning now to FIG. 5, a flow chart of an exemplary method 500 inaccordance with an embodiment is shown. The method 500 may execute inconnection with one or more systems, devices, or components, such asthose described herein. In some embodiments, the method 500 may executein connection with the application 70 of FIG. 3.

The method 500 may generally start at block 502. From block 502, flowmay proceed to one of three loops, where a first of the loops is denotedby blocks 504-508, a second of the loops is denoted by blocks 510-512,and a third of the loops is denoted by blocks 514-518. In someembodiments, the three loops may execute sequentially or in turn,although not necessarily with the same frequency. In some embodiments,the three loops may execute concurrently or in parallel with oneanother. In some embodiments, a loop may execute in response to one ormore input events or conditions.

The first loop may be used to convey status regarding replicated data ona first machine in a work group or cluster to one or more other machinesin the work group. In block 504, the first machine may scan its memoryfor replicated data. In block 506, the first machine may establish orupdate a stored data structure to reflect the results of the scan ofblock 504. In block 508, the first machine may transmit the datastructure associated with block 506, or a representation of the datastructure associated with block 506 to one or more other machines orpeers in the work group. In this manner, peer machines in the work groupmay gain insight into the data that is stored on the first machine.

The second loop may be used to receive, at the first machine,information regarding data stored at one or more other machines or peersin the work group. In block 510, the first machine may receive inputfrom the peer machine(s) in the work group. The input of block 510 mayinclude one or more data structures associated with the peer machine(s),or one or more representations of such data structures. In block 512,the first machine may update a data structure associated with the firstmachine to reflect the input of block 510. In this manner, the firstmachine may obtain insight into the data that is stored at peermachine(s) in the work group.

The third loop may be used to enable the first machine to serve as adestination of a migration operation with respect to one or more othermachines or peers in the work group. In block 514, the first machine maylisten for a migration request from one or more peer machines in thework group. When a migration request is received, flow may proceed fromblock 514 to 516 to complete the migration to the first machine. Inblock 518, a data structure associated with the first machine may beupdated to reflect the contents of the data received as part of themigration.

Turning now to FIG. 6, a flow chart of an exemplary method 600 inaccordance with an embodiment is shown. The method 600 may execute inconnection with one or more systems, devices, or components, such asthose described herein. In some embodiments, the method 600 may executein connection with the application 70 of FIG. 3. The method 600 may beused to migrate a VM from a first machine to a second machine.

The method 600 may generally start at block 602. From block 602, flowmay proceed to block 604.

In block 604, the method 600 may wait until a request (e.g., a signal,message, alert, etc.) is received that indicates a migration of a VMfrom the first machine is to occur. The request may be issued by the VMor another entity. From block 604, flow may proceed to block 606. Whencommunication between nodes has been established, the candidate listscan synchronize in the background. Performing this backgroundsynchronization amortizes compute cost that would otherwise be incurredat the time of migration.

In block 606, a determination may be made regarding minimumspecifications to host the migrating VM. Such minimum specifications mayinclude hardware specifications or configurations, such as processingcapacity or power and memory capacity or availability. From block 606,flow may proceed to block 608.

In block 608, a list of candidate destination machines may beconstructed. The list may be constructed based on the results of block606, such that those machines that fail to meet the minimumspecifications might not be included in the list. From block 608, flowmay proceed to block 610.

In block 610, an optimum memory replication may be determined. Forexample, a memory replication scheme may be selected to minimize theamount or number of contiguous memory regions or data that need to betransferred to, or obtained at, a destination machine. A priority schememay be used to obtain those contiguous memory regions that are criticalto the execution of the VM, whereas an obtaining of lower prioritycontiguous memory regions may be deferred. Startup time may also betaken into consideration when determining how or when to obtain a givencontiguous memory region. From block 610, flow may proceed to block 612.

In block 612, a destination machine (e.g., the second machine) may beselected to receive the migrating VM. The destination may be selectedbased on one or more factors, such as availability of resources,capabilities of resources, load, anticipated migration time, commonalityin terms of replicated contiguous memory regions between the firstmachine and the destination machine, etc. From block 612, flow mayproceed to block 614.

In block 614, the migration of the VM from the first machine to thedestination machine may be initiated. From block 614, flow may proceedto block 616.

In block 616, a data structure may be updated to reflect the results ofthe VM having been migrated to the destination machine. For example, anycontiguous memory regions that the destination machine might not havehad in common with the first machine prior to the migration may be addedto the data structure. In some embodiments, block 616 may correspond toblock 506 of FIG. 5. From block 616, flow may proceed to block 618.

In block 618, any updated data (e.g., the data structure of block 616,or any differences to the data structure in connection with block 616)may be transmitted to one or more peer machines. In some embodiments,block 618 may correspond to block 508 of FIG. 5. From block 618, flowmay proceed to block 604. The flow from block 618 to block 604 mayestablish a loop, such that after a first VM migration occurs or isprocessed, a second VM migration (which may correspond to the first VM)may occur or be processed.

Turning now to FIG. 7, a flow chart of an exemplary method 700 inaccordance with an embodiment is shown. The method 700 may execute inconnection with one or more systems, devices, or components, such asthose described herein. In some embodiments, the method 700 may executein connection with the application 70 of FIG. 3. The method 700 may beused to migrate a VM from a first machine to a second machine.

In block 702, one or more candidate machines may compute a score. Thescores may be indicative of how favorable a memory environment isrelative to a VM located on a first machine. The scores may be generatedin response to an indication that the VM is to be migrated from thefirst machine.

In block 704, the scores from the candidate machines (which may includethe second machine) may be received by the first machine.

In block 706, the first machine (or another machine) may compare thescores received in block 706 to identify or select the second machine asthe destination machine for the VM. For example, the second machine maybe selected as the destination machine for the VM based on the score forthe second machine indicating that the environment is more favorable tothe VM on the second machine than any of the other candidate machines.

In block 708, the VM may be migrated from the first machine to thesecond machine based on the comparison of block 706.

The methods 500, 600, and 700 are illustrative. In some embodiments, oneor more operations or blocks (or a portion thereof) may be optional. Insome embodiments, one or more blocks may execute in an order or sequencedifferent from what is shown in FIGS. 5-7. In some embodiments, one ormore additional blocks not shown may be included. In some embodiments,the methods 500, 600, and 700, or portions thereof, may be combined.

As described above, in some embodiments a representation of data or adata structure may be communicated between two or more machines. Arepresentation of data may refer to the data itself, or a transformedversion of the data. For example, in some embodiments a mnemonic (e.g.,a name) is used to refer to data, potentially with respect to a givenmachine. A recipient of the data may be configured to generate the databased on the mnemonic, potentially as opposed to transmitting the actualdata over a channel or network. In this manner, greater efficiency maybe realized, as processing speed may be faster than communicationchannel/link speed. Of course, in embodiments where the converse is true(e.g., communication channel/link speed is faster than processingspeed), the actual data may be transferred or communicated.

In some embodiments, scores related to data or memory environments maybe shared or communicated to one or more machines. The scores maypertain or relate to data at any level of abstraction, such assubstrings, strings, pages, etc. The score may reflect a differencebetween a memory environment on a particular machine (e.g., a firstmachine) relative to the needs or requirements of a VM to be migrated. Acomputing device may be configured to aggregate or tabulate the scoresin order to facilitate the VM migration from a first machine to at leastone additional machine.

A destination machine to serve as a host for a migrating VM may beidentified in real-time or substantially in real-time, potentially basedon one or more of the scores described above. Calculation and use of thescores may be automated, such that error-prone manual or guesswork typesof processes or decisions that are typical of conventional solutions maybe avoided. Such automation may ensure that an optimal allocation ofcomputing resources in, e.g., a data center is obtained for a variety ofVMs. Such optimal allocation may be achieved over time as one or moreVMs are migrated from a first machine to a second machine (andpotentially additional machines thereafter).

Technical effects and benefits include preservation of time, bandwidth,power, and processing resources during a machine migration. During amachine migration, replicated contiguous memory regions might not needto be transferred, which may result in the above-noted savings.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiments were chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

Further, as will be appreciated by one skilled in the art, aspects ofthe present invention may be embodied as a system, method, or computerprogram product. Accordingly, aspects of the present invention may takethe form of an entirely hardware embodiment, an entirely softwareembodiment (including firmware, resident software, micro-code, etc.) oran embodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, radio frequency (RF), etc., or anysuitable combination of the foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described above with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention.

In this regard, each block in the flowchart or block diagrams mayrepresent a module, segment, or portion of code, which comprises one ormore executable instructions for implementing the specified logicalfunction(s). It should also be noted that, in some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts, or combinations of special purpose hardware andcomputer instructions.

What is claimed is:
 1. A computer program product comprising: anon-transitory computer readable storage medium having computer readableprogram code embodied therewith, the computer readable program codecomprising: computer readable program code configured for: receiving arequest from a virtual machine to migrate the virtual machine from afirst processor, determining a minimum hardware configuration to supportthe virtual machine responsive to the request, constructing a list ofone or more candidate processors in a work group to migrate the virtualmachine to, wherein each of the one more candidate processors supportsthe minimum hardware configuration, determining for each of the one ormore candidate processors information about shared contiguous memoryregions accessible to the one or more candidate processors that is incommon to contiguous memory regions accessed by the virtual machine, andselecting a second processor included in the list of one or morecandidate processors based on the determination of the information aboutshared contiguous memory regions accessible to each of the one or morecandidate processors that are in common to contiguous memory regionsaccessed by the virtual machine, and migrating the virtual machine fromthe first processor to the second processor, wherein the informationabout shared contiguous memory regions includes that a number ofcontiguous memory regions accessible to the second processor that are incommon to contiguous memory regions accessed by the virtual machine isgreater than or equal to a number of contiguous memory regionsaccessible to each of the other one or more candidate processors thatare in common to contiguous memory regions accessed by the virtualmachine.
 2. The computer program product of claim 1, wherein: theselecting the second processor is further based on an availability ofresources at the second processor, capabilities of the resources at thesecond processor, a load at the second processor, and an anticipatedmigration time from the first processor to the second processor.